MarRiskCounter
Values in this table represent current (live) SpiderRock MAR risk counters for a risk group/risk firm combination. A risk group is typically a group of client accounts that have a common beneficial owner. A risk firm is a firm with control of the corresponding risk settings for the risk group.
METADATA
Attribute | Value |
---|---|
Topic | 4625-risk-counter |
MLink Token | ClientControl |
Product | SRControl |
accessType | SELECT |
Table Definition
Field | Type | Key | Default Value | Comment |
---|---|---|---|---|
ticker_at | enum - AssetType | PRI | 'None' | ANYANY represents the entire control group |
ticker_ts | enum - TickerSrc | PRI | 'None' | ANYANY represents the entire control group |
ticker_tk | VARCHAR(12) | PRI | '' | ANYANY represents the entire control group |
riskGroup | VARCHAR(16) | PRI | '' | |
riskFirm | VARCHAR(16) | PRI | '' | client firm that can viewedit this record |
isTestAccnt | enum - YesNo | PRI | 'None' | |
sysRealm | enum - SysRealm | 'None' | ||
sysEnvironment | enum - SysEnvironment | 'None' | original source sys environment Stable Current etc | |
riskEngine | VARCHAR(32) | '' | EE engine name | |
liveMarginAcc | FLOAT | 0 | live net per symbol total portfolio startofday positions day trades margin can include external sources | |
liveMarginDay | FLOAT | 0 | live net per symbol day portfolio day trades only margin can include external sources | |
liveOpenExposure | FLOAT | 0 | live abs open child order Delta no netting open child orders only | |
dayFutCnBot | INT | 0 | day future contracts bot | |
dayFutCnSld | INT | 0 | day future contracts sld | |
accFutCnNet | INT | 0 | accnt future contracts net can be startofday positions day trades | |
dayMarginUDnVDn | FLOAT | 0 | day margin UPrcDnVolDn | |
dayMarginUDnVUp | FLOAT | 0 | day margin UPrcDnVolUp | |
dayMarginUUpVDn | FLOAT | 0 | day margin UPrcUpVolDn | |
dayMarginUUpVUp | FLOAT | 0 | day margin UPrcUpVolUp | |
accMarginUDnVDn | FLOAT | 0 | acc margin UPrcDnVolDn | |
accMarginUDnVUp | FLOAT | 0 | acc margin UPrcDnVolUp | |
accMarginUUpVDn | FLOAT | 0 | acc margin UPrcUpVolDn | |
accMarginUUpVUp | FLOAT | 0 | acc margin UPrcUpVolUp | |
counter | INT | 0 | ||
timestamp | DATETIME(6) | '1900-01-01 00:00:00.000000' | timestamp of latest change |
PRIMARY KEY DEFINITION (Unique)
Field | Sequence |
---|---|
ticker_tk | 1 |
ticker_at | 2 |
ticker_ts | 3 |
riskGroup | 4 |
riskFirm | 5 |
isTestAccnt | 6 |
CREATE TABLE EXAMPLE QUERY
CREATE TABLE `SRControl`.`MsgMarRiskCounter` (
`ticker_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT '''*-ANY-ANY'' represents the entire control group',
`ticker_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT '''*-ANY-ANY'' represents the entire control group',
`ticker_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT '''*-ANY-ANY'' represents the entire control group',
`riskGroup` VARCHAR(16) NOT NULL DEFAULT '',
`riskFirm` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'client firm that can view/edit this record',
`isTestAccnt` ENUM('None','Yes','No') NOT NULL DEFAULT 'None',
`sysRealm` ENUM('None','SysTest','NMS','CME','FR2','LD4','DR') NOT NULL DEFAULT 'None',
`sysEnvironment` ENUM('None','Neptune','Pluto','V7_Stable','V7_Latest','Saturn','Venus','Mars','SysTest','V7_Current') NOT NULL DEFAULT 'None' COMMENT 'original (source) sys environment [Stable, Current, etc]',
`riskEngine` VARCHAR(32) NOT NULL DEFAULT '' COMMENT 'EE engine name',
`liveMarginAcc` FLOAT NOT NULL DEFAULT 0 COMMENT 'live net (per symbol) total portfolio (start-of-day positions + day trades) margin (can include external sources)',
`liveMarginDay` FLOAT NOT NULL DEFAULT 0 COMMENT 'live net (per symbol) day portfolio (day trades only) margin (can include external sources)',
`liveOpenExposure` FLOAT NOT NULL DEFAULT 0 COMMENT 'live abs open child order $Delta (no netting) (open child orders only)',
`dayFutCnBot` INT NOT NULL DEFAULT 0 COMMENT 'day future contracts bot',
`dayFutCnSld` INT NOT NULL DEFAULT 0 COMMENT 'day future contracts sld',
`accFutCnNet` INT NOT NULL DEFAULT 0 COMMENT 'accnt future contracts (net) [can be +/-] (start-of-day positions + day trades)',
`dayMarginUDnVDn` FLOAT NOT NULL DEFAULT 0 COMMENT 'day margin (UPrcDn/VolDn)',
`dayMarginUDnVUp` FLOAT NOT NULL DEFAULT 0 COMMENT 'day margin (UPrcDn/VolUp)',
`dayMarginUUpVDn` FLOAT NOT NULL DEFAULT 0 COMMENT 'day margin (UPrcUp/VolDn)',
`dayMarginUUpVUp` FLOAT NOT NULL DEFAULT 0 COMMENT 'day margin (UPrcUp/VolUp)',
`accMarginUDnVDn` FLOAT NOT NULL DEFAULT 0 COMMENT 'acc margin (UPrcDn/VolDn)',
`accMarginUDnVUp` FLOAT NOT NULL DEFAULT 0 COMMENT 'acc margin (UPrcDn/VolUp)',
`accMarginUUpVDn` FLOAT NOT NULL DEFAULT 0 COMMENT 'acc margin (UPrcUp/VolDn)',
`accMarginUUpVUp` FLOAT NOT NULL DEFAULT 0 COMMENT 'acc margin (UPrcUp/VolUp)',
`counter` INT NOT NULL DEFAULT 0,
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'timestamp of latest change',
PRIMARY KEY USING HASH (`ticker_tk`,`ticker_at`,`ticker_ts`,`riskGroup`,`riskFirm`,`isTestAccnt`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='Values in this table represent current (live) SpiderRock MAR risk counters for a risk group/risk firm combination.\nA risk group is typically a group of client accounts that have a common beneficial owner. A risk firm is a firm with control of the corresponding risk settings for the risk group.';
SELECT TABLE EXAMPLE QUERY
SELECT
`ticker_at`,
`ticker_ts`,
`ticker_tk`,
`riskGroup`,
`riskFirm`,
`isTestAccnt`,
`sysRealm`,
`sysEnvironment`,
`riskEngine`,
`liveMarginAcc`,
`liveMarginDay`,
`liveOpenExposure`,
`dayFutCnBot`,
`dayFutCnSld`,
`accFutCnNet`,
`dayMarginUDnVDn`,
`dayMarginUDnVUp`,
`dayMarginUUpVDn`,
`dayMarginUUpVUp`,
`accMarginUDnVDn`,
`accMarginUDnVUp`,
`accMarginUUpVDn`,
`accMarginUUpVUp`,
`counter`,
`timestamp`
FROM `SRControl`.`MsgMarRiskCounter`
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ticker_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ticker_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`ticker_tk` = 'Example_ticker_tk'
AND
/* Replace with a VARCHAR(16) */
`riskGroup` = 'Example_riskGroup'
AND
/* Replace with a VARCHAR(16) */
`riskFirm` = 'Example_riskFirm'
AND
/* Replace with a ENUM('None','Yes','No') */
`isTestAccnt` = 'None';
Doc Columns Query
SELECT * FROM SRControl.doccolumns WHERE TABLE_NAME='MarRiskCounter' ORDER BY ordinal_position ASC;